Add STB and FileWatcher as Git submodules#21
Open
1234-ad wants to merge 3 commits intoCGS-IITKGP:mainfrom
Open
Add STB and FileWatcher as Git submodules#211234-ad wants to merge 3 commits intoCGS-IITKGP:mainfrom
1234-ad wants to merge 3 commits intoCGS-IITKGP:mainfrom
Conversation
- Add stb as submodule from nothings/stb repository - Add FileWatcher as submodule from ThomasMonkman/filewatch repository - Ensures consistent dependency management across all external libraries - Fixes issue CGS-IITKGP#17
- Add external/stb to include directories for stb_image.h - Add external/filewatch to include directories for FileWatch.hpp - Ensures proper header resolution from submodules - Part of fix for issue CGS-IITKGP#17
- Document changes made in this PR - Provide step-by-step migration instructions for existing users - Explain benefits of submodule approach - Part of fix for issue CGS-IITKGP#17
Zone-Infinity
suggested changes
Jan 11, 2026
Contributor
There was a problem hiding this comment.
Yea you don't have to do this, just delete the files and let that be in the PR.
Before commiting that, check if it works (you have to also change each file for the imports/includes)
| [submodule "external/stb"] | ||
| path = external/stb | ||
| url = https://github.com/nothings/stb.git | ||
| branch = master |
Contributor
There was a problem hiding this comment.
i dont think the branch is necessary
but it can stay ig
| [submodule "external/filewatch"] | ||
| path = external/filewatch | ||
| url = https://github.com/ThomasMonkman/filewatch.git | ||
| branch = master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses issue #17 by converting STB and FileWatcher from direct file inclusion to proper Git submodules, ensuring consistent dependency management across all external libraries.
Changes Made
1. Updated
.gitmodulesexternal/stbsubmodule pointing tohttps://github.com/nothings/stb.gitexternal/filewatchsubmodule pointing tohttps://github.com/ThomasMonkman/filewatch.git2. Updated
CMakeLists.txtexternal/stbto include directoriesexternal/filewatchto include directories3. Added Migration Documentation
SUBMODULE_MIGRATION.mdwith detailed migration stepsBenefits
✅ Consistency: All external dependencies now managed uniformly as Git submodules
✅ Version Control: Can track and pin specific versions of STB and FileWatcher
✅ Maintainability: Easier to update dependencies to newer versions
✅ Repository Size: Reduces duplication of large header files in the main repo
Migration Path
For existing users, the migration is straightforward:
external/FileWatch.hppandsrc/stb_image.h)git submodule update --init --recursiveDetailed instructions are provided in
SUBMODULE_MIGRATION.md.Testing Checklist
Related Issues
Fixes #17
Notes
external/FileWatch.hppandsrc/stb_image.hfiles should be removed after this PR is mergedgit submodule update --init --recursiveafter pulling these changesFuture Considerations
This PR sets the foundation for adding Bullet Physics as a submodule (mentioned in issue #17), maintaining consistency across all external dependencies.